/*
* $Id: JournalTable.h 152 2010-09-23 18:28:55Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _JOURNAL_TABLE_H_
#define _JOURNAL_TABLE_H_

#include "../Table.h"
#include "../Operation.h"

class CJournalTable : public CTable, public CFillContent
{
public:
	CJournalTable();
	virtual ~CJournalTable();
public:
	struct content : public CTable::content{
		int s_nIdFamily;
		time_t s_date;
		int s_nFrame;
		int s_nStrength;
		Journal::queen_bee s_QueenBee;
		int s_nWax;
		int s_nAmbrosia;
		int s_nEvacuation;
		int s_nFeeding;
		Journal::disease s_disease;
		std::tstring s_strNote;
		int s_nIdRecord;
		content();
		virtual void Clear();
		virtual void Set(const std::vector<CTableItem>& aContent);
		virtual void Free();
	}m_content;
public:
	virtual void CreateTable(IDatabase* pDatabase);
	virtual void UpdateValue(IDatabase* pDatabase);
	virtual IResult* GetValue(IDatabase* pDatabase);
	virtual void SetValue(IDatabase* pDatabase);
	virtual void DeleteValue(IDatabase* pDatabase);
	virtual IOperation::i_content* CreateContent();
};

#endif/*_JOURNAL_TABLE_H_*/